package com.iona.dao;

import org.hibernate.criterion.Restrictions;

import com.iona.domain.DisciplinePurview;

public class DisciplinePurviewDAO extends BaseDAO {

	public DisciplinePurview findByDisciplineAndPurview(Integer d, Integer p) {
		return (DisciplinePurview) getSession()
				.createCriteria(DisciplinePurview.class)
				.add(Restrictions.eq("discipline.id", d))
				.add(Restrictions.eq("purview.id", p)).uniqueResult();
	}

}
